← Back
Editing: index-legacy226.js
!function(){function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,r,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function c(t,o,a,i){var c=o&&o.prototype instanceof s?o:s,l=Object.create(c.prototype);return n(l,"_invoke",function(t,n,o){var a,i,c,s=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,n){return a=t,i=0,c=e,p.n=n,u}};function y(t,n){for(i=t,c=n,r=0;!f&&s&&!o&&r<l.length;r++){var o,a=l[r],y=p.p,d=a[2];t>3?(o=d===n)&&(c=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=y&&((o=t<2&&y<a[1])?(i=0,p.v=n,p.n=a[1]):y<d&&(o=t<3||a[0]>n||n>d)&&(a[4]=t,a[5]=n,p.n=d,i=0))}if(o||t>1)return u;throw f=!0,n}return function(o,l,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&y(l,d),i=l,c=d;(r=i<2?e:c)||!f;){a||(i?i<3?(i>1&&(p.n=-1),y(i,c)):p.n=c:p.v=c);try{if(s=2,a){if(i||(o="next"),r=a[o]){if(!(r=r.call(a,c)))throw TypeError("iterator result is not an object");if(!r.done)return r;c=r.value,i<2&&(i=0)}else 1===i&&(r=a.return)&&r.call(a),i<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((r=(f=p.n<0)?c:t.call(n,p))!==u)break}catch(r){a=e,i=1,c=r}finally{s=1}}return{value:r,done:f}}}(t,a,i),!0),l}var u={};function s(){}function l(){}function f(){}r=Object.getPrototypeOf;var p=[][a]?r(r([][a]())):(n(r={},a,function(){return this}),r),y=f.prototype=s.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,n(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t}return l.prototype=f,n(y,"constructor",f),n(f,"constructor",l),l.displayName="GeneratorFunction",n(f,i,"GeneratorFunction"),n(y),n(y,i,"Generator"),n(y,a,function(){return this}),n(y,"toString",function(){return"[object Generator]"}),(t=function(){return{w:c,m:d}})()}function n(t,e,r,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}n=function(t,e,r,o){function i(e,r){n(t,e,function(t){return this._invoke(e,r,t)})}e?a?a(t,e,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[e]=r:(i("next",0),i("throw",1),i("return",2))},n(t,e,r,o)}function e(t,n,e,r,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void e(t)}c.done?n(u):Promise.resolve(u).then(r,o)}function r(t){return function(){var n=this,r=arguments;return new Promise(function(o,a){var i=t.apply(n,r);function c(t){e(i,o,a,c,u,"next",t)}function u(t){e(i,o,a,c,u,"throw",t)}c(void 0)})}}System.register(["./index-legacy93.js?v=1765440387","./utils-lib-legacy.js?v=1765440387","./files-legacy.js?v=1765440387","./store-legacy.js?v=1765440387","./base-lib-legacy.js?v=1765440387","./column-legacy.js?v=1765440387","./__commonjsHelpers__-legacy.js?v=1765440387","./validator-legacy.js?v=1765440387","./index-legacy94.js?v=1765440387","./store-legacy2.js?v=1765440387","./index-legacy91.js?v=1765440387"],function(n,e){"use strict";var o,a,i,c,u,s,l,f,p,y,d,v,h,m,b,g,j,w,_,k,x,O,T,P,S;return{setters:[function(t){o=t._},function(t){a=t.o,i=t.R,c=t.K,u=t.k,s=t.b},function(t){l=t.$,f=t.ar,p=t.as},function(t){y=t.an,d=t.aP,v=t.aB,h=t.aQ,m=t.aR,b=t.aS},function(t){g=t.c,j=t.r,w=t.aC,_=t.p,k=t.q,x=t.v,O=t.e,T=t.A,P=t.x},function(t){S=t.u},null,null,null,null,null],execute:function(){var e={class:"py-[1rem] px-16px"};n("default",g({__name:"index",props:{compData:{default:function(){return{}}}},emits:["close"],setup:function(n,g){var G=g.expose,N=g.emit,q=s(),E=n,C=N,D=j(E.compData.editorTabsActive.history||[]),F=function(){var n=r(t().m(function n(e){return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a({title:"恢复历史文件",content:"是否恢复历史文件 ".concat(i(Number(e)),"?恢复历史文件后,当前文件内容将会被替换!")});case 1:c({loading:"正在恢复历史文件,请稍后...",request:l({filename:y.path,history:e}),message:!0,success:function(t){t.status&&(E.compData.callback(),B())}});case 2:return t.a(2)}},n)}));return function(t){return n.apply(this,arguments)}}(),R=function(){var n=r(t().m(function n(e){var r,o,a;return t().w(function(t){for(;;)switch(t.n){case 0:return r={filename:y.path,history:e},t.n=1,c({request:f(r)});case 1:if(o=t.v,a=d(y.id),!o.status){t.n=4;break}return v.value={id:y.id,st_mtime:e,path:y.path,type:"editor"},C("close"),t.n=2,h({title:"".concat(y.title," <-> ").concat(y.title),type:"diff",mode:"diff",path:y.path});case 2:return t.n=3,m({mode:"ace/mode/".concat(y.mode),left:{content:o.data.data,editable:!1,copyLinkEnabled:!1},right:{content:a.getValue(),editable:!1,copyLinkEnabled:!1}});case 3:t.n=5;break;case 4:q.request(o);case 5:return t.a(2)}},n)}));return function(t){return n.apply(this,arguments)}}(),A=function(){var n=r(t().m(function n(e){return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,a({title:"删除历史文件",content:"是否删除历史文件 ".concat(i(Number(e)),"?删除历史文件后,将无法恢复!")});case 1:c({loading:"正在删除历史文件,请稍后...",request:p({filename:y.path||"",history:e}),message:!0,success:function(t){t.status&&B()}});case 2:return t.a(2)}},n)}));return function(t){return n.apply(this,arguments)}}(),L=[{label:"版本时间",prop:"time",render:function(t){var n,e;return w("span",{},(n=t,e=new Date(1e3*Number(n)),isNaN(e.getTime())?n:i(e)))}},S([{onClick:R,width:65,title:"文件对比"},{onClick:F,title:"恢复"},{onClick:A,title:"删除"}])],B=function(){var n=r(t().m(function n(){var e,r;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,b(y.path);case 1:e=t.v,r=e.data,D.value=r.historys,t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},n,null,[[0,2]])}));return function(){return n.apply(this,arguments)}}();return _(function(){B()}),G({}),function(t,n){var r=u,a=o;return k(),x("div",e,[O(a,null,{content:T(function(){return[O(r,{ref:"fileTableRef",height:"40rem",column:L,description:"列表为空",data:P(D)},null,8,["data"])]}),_:1})])}}}))}}})}();
Save File
Cancel